// index.js
// 获取应用实例
Page({
    data: {
      index:0,
      array:["火锅","烧烤","腰子","炒菜"],
        htmlSnip: `<div class="div_class">
        <h1>Title</h1>
        <p class="p">
          Life is&nbsp;<i>like</i>&nbsp;a box of
          <b>&nbsp;chocolates</b>.
        </p>
      </div>`,
        imgsrc: "../../img/banner1.jpg",
        bannerList: ["../../img/banner1.jpg", "../../img/banner2.jpg", "../../img/banner3.jpg"],
        myname:""
    },
    onLoad(options) { //接受参数
        console.log(options.id)
        console.log(options.age)
    },
    myscroll(e) {
        // e.detail
        // console.log(e)
        console.log(e.detail.scorllTop)
    },
    radiochange(e){
      console.log(e.detail.value)
    },
    textchange(e){
      console.log(e.detail.value)
    },
    sliderchange(e){
      console.log(e.detail.value)
    },
    bindPickerChange(e){
      console.log(e)
      this.setData({
        index:e.detail.value  //2
      })
    },
    getinfo(){
      console.log(111)
    },
    getphone(e){
      console.log(e)
    },
    inpval(e){
      console.log(e.detail.value)
    },
    myinp(e){
      console.log(e.detail.value)
      this.setData({
        myname:e.detail.value
      })
    }
})